#coding:utf-8
import os, sys
sys.path.append('matchutils')
import sys
import os
import json
from algo.similarity import *
from predict import *
#from config.bind_up_bound as bind_up_bound
#import config.bind_lo_bound as bind_lo_bound
import config

bind_up_bound = config.bind_up_bound
bind_lo_bound = config.bind_lo_bound

def format( item ):
    return item

def score_gbrt( album, video ):
    try:
        a, v = {}, {}
        album = format( album )
        video = format( video )
        calc_sim = Similarity( album, video ) 
        features = calc_sim.get_features()
        prob = gbrt_model.predict( features )
        return prob, features
    except Exception,e:
        print e
        pass
    return 0, {}


